#pragma once

#include <iostream>
#include <tinyxml.h>

class XmlWrapper
{
public:
	XmlWrapper( const char* filePath );
	virtual ~XmlWrapper();

	// Should be called right after constructor is called
	bool isValid() const { return _valid; }

	const char* getNodeType() const;
	const char* getNodeValue() const;
	const char* getAttrValue( const char* attrName ) const;	

	bool firstChild();
	bool nextSibling();
	bool parent();

private:
	bool _valid;
	std::string _text;
	int _depth;
	TiXmlNode* _currentNode;
	TiXmlDocument _doc;
};

